package com.example.mybatisplusgen.service.impl;

import com.example.mybatisplusgen.pojo.BlogTag;
import com.example.mybatisplusgen.mapper.BlogTagDao;
import com.example.mybatisplusgen.service.BlogTagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * <p>
 * 文章标签管理 服务实现类
 * </p>
 *
 * @author 又菜又爱玩
 * @since 2023-04-27
 */
@Service
public class BlogTagServiceImpl extends ServiceImpl<BlogTagDao, BlogTag> implements BlogTagService {

    @Override
    public List<BlogTag> selectBlogTagList(BlogTag blogTag) {
        return baseMapper.selectList(null);
    }

    @Override
    public boolean insertBlogTag(BlogTag blogTag) {
        return baseMapper.insert(blogTag) > 0;
    }

    @Override
    public boolean updateBlogTag(BlogTag blogTag) {
        return baseMapper.updateById(blogTag) > 0;
    }

    @Override
    public boolean deleteBlogTag(Long id) {
        return baseMapper.deleteById(id) > 0;
    }
}
